﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessLibrary.DAL;
namespace BusinessLibrary.BLL
{
   public class Gouvernorat
    {
       
  # region var
        public int  Id { get; set; }
        public string Nom { get; set; }
        public Pays pays { get; set; }  

        #endregion
        #region methodes
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static Gouvernorat GetGouvernoratById(int id)
        {
            return sqlGouvernorat.GetGouvernoratById(id);
        }


        public static int deleteGouvernerat(int id)
        {
            return sqlGouvernorat.deletGouvernorat(id);
        }


        public static int SaveGouvernerat(Gouvernorat g)
        {
            int nbRow;
            if ((nbRow = sqlGouvernorat.updateGouvernorat(g)) > 0)
                return nbRow;
            else
                return sqlGouvernorat.insertGouvernorat(g);
        }
    }
        #endregion
    }
